﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using BoardPACDSBO.Auth;
using BoardPACDSBO.General;
using BoardPACDSBO.UserMgt;
using BoardPACDSBO.Base;
using BoardPACDSBO.DownloadApp;

namespace BoardPACDSWS.Base
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IAuthorize" in both code and config file together.
    [ServiceContract]
    public interface IAuthorize
    {
        [OperationContract]
        [FaultContract(typeof(GenFault))]
        Guid GetUserGuid(string userName);

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        bool ValidateUser(string userName, string password);

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        bool IsIPadAllowed(LogOnModel model, RequestHeader request, string format);

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        UserMgtModelsMetadata GetUser(string userName);

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        List<UserRole> GetUserRoles(List<string> userRoles);

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        List<RoleOfUser> GetRoleOfUser(int userId);

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        int GetRegisteredDiviceCount(RequestHeader request);

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        MemberModel GetMembershipUser(string userName);

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        MembershipServiceModel GetMembershipService();

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        bool UnlockUser(string userName);

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        BaseServiceModel OnAuthorization(int customUserId, int type, int RefId, string actionString, int PasswordExpiryPeriod, string fmt);

        [OperationContract]
        [FaultContract(typeof(GenFault))]
        DownloadAppModel UpdateDB(string iPaVersion, string dbVersion, int userId);
    }
}
